package com.example.springaidemo.controller.case6;

import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.stereotype.Service;

/**
 * @author stone
 * @date 2025/7/14 13:55
 */
@Slf4j
@Service
public class MathService {

    @Tool(description = "加法方法")
    public Integer add(Integer a, Integer b) {
        log.info("===============add方法被调用: a={}, b={}", a, b);
        return a + b;
    }

    @Tool(description = "乘法方法")
    public Integer multiply(Integer a, Integer b) {
        log.info("===============multiply方法被调用: a={}, b={}", a, b);
        return a * b;
    }

}
